import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int[] arr={10,5,8,23,15};
        //直接插入排序
        Sort.insertSort(arr);
        System.out.print("直接插入排序：");
        System.out.println(Arrays.toString(arr));

        //希尔排序
        int[] arr1={8,2,12,6,11};
        Sort.shellSort(arr1);
        System.out.print("希尔排序：");
        System.out.println(Arrays.toString(arr1));

        //直接选择排序
        int[] arr2 ={25,14,8,12,20};
        Sort.selectSort(arr2);
        System.out.print("直接选择排序：");
        System.out.println(Arrays.toString(arr2));

        //堆排序
        int[] arr3={65,48,50,25,13};
        Sort.heapSort(arr3);
        System.out.print("堆排序：");
        System.out.println(Arrays.toString(arr3));

        //冒泡排序
        int[] arr4 = {24, 35, 30, 45, 10};
        Sort.bubbleSort(arr4);
        System.out.print("冒泡排序：");
        System.out.println(Arrays.toString(arr4));

        //快速排序
        int[] arr5 = {8, 6, 25, 12, 10};
        Sort.quickSort(arr5);
        System.out.print("快速排序:");
        System.out.println(Arrays.toString(arr5));

        //快速排序非递归
        int[] arr6 = {25, 6, 13, 42, 36};
        Sort.quickSort(arr6);
        System.out.print("快速排序非递归:");
        System.out.println(Arrays.toString(arr6));

        //归并排序
        int[] arr7 = {12, 8, 88, 65, 49};
        Sort.mergeSort(arr7);
        System.out.print("归并排序：");
        System.out.println(Arrays.toString(arr7));

        //非递归的归并排序
        int[] arr8 = {5, 24, 12, 10, 1};
        Sort.mergeSortNor(arr8);
        System.out.print("非递归归并排序：");
        System.out.println(Arrays.toString(arr8));
        //计数排序
        int[] arr9 = {20, 18, 26, 66, 6};
        Sort.countSort(arr9);
        System.out.print("计数排序：");
        System.out.println(Arrays.toString(arr9));
    }
}
